<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('frontend/index');
});


//后台路由
Route::group(['prefix' => 'admin'], function () {
    Route::group(['middleware' => 'user.validate'], function() {
        Route::get('/', 'Backend\IndexController@index')->name('backendIndex');
        Route::get('login', 'Backend\LoginController@index')->name('backendLogin');
        Route::get('category', '\App\Modules\Backend\Category\Http\Controllers\IndexController@index')->name('category_list');
        Route::get('order', '\App\Modules\Backend\Order\Http\Controllers\IndexController@index')->name('order_list');
    });
    Route::post('login', 'Backend\LoginController@login');
});



